<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{   /*权值     0     很容易覆盖*/
				  color: #fffaaf !important;
				  background: #55ffff ;
			}
			div{   /*   权值     1*/
				color: #00ff00;
				background: #ff557f;
			}
			.d1{/*     权重     10*/
				color: #f5ff26;
				background: #f826ff;
			}
			div.d1{   /*    选择器权值之和      权值      1+10=11*/
				color: #1515ff;
				background: #000800;
			}
			body div.d1{   /*     权值     12*/
				font-size: 25px;
				color: #000000;
				background: #ff0000;
				
			}
			#d1{       /*权值：  101    */
				font-size: 15px;
				color: #aaaaff;
				background: #aaff00;
			}
			div#d1:hover{   /*权值：   1111*/
				color: #aaaaff;
				background: #aaff00;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color: red;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores eaque, impedit quisquam, dolorum asperiores pariatur molestias hic corporis cumque quas temporibus quos nam quo harum provident esse modi. Ad, eligendi.</div>
	</body>
</html>